<template>
  <el-scrollbar height="365px">
    <div class="gameJudge">
      <div class="judgeItem" v-for="(item, index) in props.judge" :key="index">
        <div class="img">
          <img
            :src="item.img"
            :alt="item.name"
            style="width: 110px; height: 52px"
          />
        </div>

        <div class="gameName">
          <a :href="item.link" target="_blank">{{ item.name }}</a>
          <p>{{ item.introduce }}</p>
        </div>
        <div class="score">
          <span>{{ item.score }}</span>
          <em>{{ item.judge }}</em>
        </div>
      </div>
    </div>
  </el-scrollbar>
</template>

<script setup>
const props = defineProps({
  judge: Array,
});
</script>

<style scoped lang="less">
.gameJudge {
  .judgeItem {
    border-top: 1px solid #e8e8e8;
    margin-top: 10px;
    padding-top: 14px;
    display: flex;
    justify-content: space-between;

    .img {
      width: 110px;
      height: 52px;
      overflow: hidden;
      border-radius: 5px;
      img {
        transition: all 0.3s;
      }
      &:hover img {
        transform: scale(1.1);
      }
    }
    .gameName {
      margin-right: 70px;
      a {
        height: 24px;
        line-height: 24px;
        display: block;
        width: 100%;
        overflow: hidden;
        font-size: 16px;
        &:hover {
          color: #ff2d22;
        }
      }
      p {
        color: #6f6f6f;
        width: 100%;
        font-size: 12px;
        height: 14px;
        overflow: hidden;
      }
    }
    .score {
      margin-right: 20px;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      span {
        font-size: 30px;
        color: #f76341;
        font-weight: bold;
      }
      em {
        display: block;
        height: 16px;
        line-height: 16px;
        color: #f76341;
        font-style: normal;
      }
      &::before {
        content: "";
        position: absolute;
        width: 1px;
        height: 20px;
        left: -15px;
        background: #dedede;
        margin-top: 16px;
      }
    }
  }
}
</style>
